$OpenBSD: patch-platform_gl_gl-main_c,v 1.4 2017/05/05 14:02:51 sthen Exp $

add pledge(2) to mupdf-gl:
  - drm : opengl stuff
  - proc exec : opening a external browser on uri link

Index: platform/gl/gl-main.c
--- platform/gl/gl-main.c.orig
+++ platform/gl/gl-main.c
@@ -1486,6 +1486,12 @@ int main(int argc, char **argv)
 
 	glfwMakeContextCurrent(window);
 
+	if (pledge("stdio rpath drm proc exec", NULL) == -1)
+	{
+		fprintf(stderr, "pledge: %s\n", strerror(errno));
+		exit(1);
+	}
+
 	ctx = fz_new_context(NULL, NULL, 0);
 	fz_register_document_handlers(ctx);
 
